package com.ruoyi.shop.mapper;

import java.util.List;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.shop.domain.ShopProductComment;

/**
 * 商品评论Mapper接口
 * 
 * @author Alan Zhang
 * @date 2021-09-12
 */
public interface ShopProductCommentMapper 
{
    /**
     * 查询商品评论
     * 
     * @param id 商品评论主键
     * @return 商品评论
     */
    public ShopProductComment selectShopProductCommentById(Long id);

    /**
     * 查询商品评论列表
     * 
     * @param shopProductComment 商品评论
     * @return 商品评论集合
     */
    public List<ShopProductComment> selectShopProductCommentList(ShopProductComment shopProductComment);

    /**
     * 新增商品评论
     * 
     * @param shopProductComment 商品评论
     * @return 结果
     */
    public int insertShopProductComment(ShopProductComment shopProductComment);

    /**
     * 修改商品评论
     * 
     * @param shopProductComment 商品评论
     * @return 结果
     */
    public int updateShopProductComment(ShopProductComment shopProductComment);

    /**
     * 删除商品评论
     * 
     * @param id 商品评论主键
     * @return 结果
     */
    public int deleteShopProductCommentById(Long id);

    /**
     * 批量删除商品评论
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteShopProductCommentByIds(String[] ids);

    /**
     * 前两条最新 商品评论
     * @param productId 商品id
     * @return
     */
    public List<ShopProductComment> selectTop2ShopProductCommentByProductId(Long productId);
}
